package cn.edu.bcu.ls.service;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import cn.edu.bcu.ls.entity.History;
import cn.edu.bcu.ls.entity.Hot;
import cn.edu.bcu.ls.mapper.HistoryMapper;
import cn.edu.bcu.ls.serviceImpl.HistoryService;

@Service
public class HistoryServiceImpl implements HistoryService {

    @Resource
    private HistoryMapper historyMapper;

    @Override
    public int deleteByPrimaryKey(Integer hId) {
        return historyMapper.deleteByPrimaryKey(hId);
    }

    @Override
    public int insert(History record) {
        return historyMapper.insert(record);
    }

    @Override
    public int insertSelective(History record) {
        return historyMapper.insertSelective(record);
    }

	@Override
	public List<History> queryHistory() {
		// TODO Auto-generated method stub
		return historyMapper.queryHistory();
	}
    @Override
    public List<History> selectByPrimaryKey(History history) {
        return historyMapper.getTagByCourseId(history);
    }

    @Override
    public int updateByPrimaryKeySelective(History record) {
        return historyMapper.updateByPrimaryKeySelective(record);
    }

    @Override
    public int updateByPrimaryKey(History record) {
        return historyMapper.updateByPrimaryKey(record);
}

	@Override
	public List<Hot> getHotByCourse() {
		// TODO Auto-generated method stub
		return historyMapper.getHotByCourse();
	}
}